<template>
  <div>
    <el-menu
      :default-active="activeIndex2"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-menu-item index="1">Bug</el-menu-item>
      <el-submenu index="2">
        <template slot="title">用例</template>
        <el-menu-item index="2-1" @click.native="gncs">功能测试</el-menu-item>
        <el-menu-item index="2-2">性能测试</el-menu-item>
      </el-submenu>
      <el-menu-item index="3" @click="ylk">用例库</el-menu-item>
    </el-menu>
    <div>
      <router-view/>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    gncs() {
      //清空token
      localStorage.clear();
      this.$router.push("/cases/gongneng");
    },
    ylk() {
      this.$router.push("library")
    }
  }
}
</script>

<style>

</style>